import Vue from "vue";
import App from "./App.vue";
import "./registerServiceWorker";
import router from "./router";
import store from "./store";
import vuetify from "./plugins/vuetify";
import axios from "axios";
axios.defaults.baseURL = "http://www.hanyuzhen.online";
const token = window.localStorage.getItem("weiyi_token");
if (token) {
  axios.defaults.headers["authorization"] = `Bearer ${token}`;
}
Vue.prototype.$axios = axios;
import "./assets/css/base.css";
import "../public/iconfont/iconfont-face.css";
import "../public/iconfont/iconfont-style.css";

Vue.config.productionTip = false;

import themes from "./plugins/themes.js";
Vue.use(themes);

import vNode from "./directives/v-node.js";
Vue.use(vNode);

import moment from "moment";
Vue.prototype.$moment = moment;

// import VueSocketIO from "vue-socket.io";
// import ClientSocketIO from "socket.io-client";

// Vue.use(
//   new VueSocketIO({
//     debug: true,
//     connection: ClientSocketIO.connect("/socket.io"),
//     vuex: {},
//   })
// );

new Vue({
  router,
  store,
  vuetify,
  render: (h) => h(App),
}).$mount("#app");
